#include"progress_bar.h"
void ProcessOn()
{
    int cnt=0;
    char bar[NUM];
    memset(bar,'\0',sizeof(bar));
    //reverse
    const char* lable="|\\-/";
    char style[S_NUM]={'$','*','^','-','+','>'};
    while(cnt<NUM)
    {
        bar[cnt]='>';
        //printf("[%-100s][%d%%][%c]\r",bar,cnt,lable[cnt%4]);
        printf("\033[46;35m[%-100s][%d%%][%c]\033[0m\r",bar,cnt,lable[cnt%4]);
        fflush(stdout);
        bar[cnt++]=style[N];
        usleep(50000);//5s跑完 5/100 0.05 50000
    }
    printf("\n");
}
